/* 经营分析组件独立样式 */
.business-analysis {
    padding: 20px;
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    min-height: 100vh;
}

.business-analysis .el-row {
    margin-bottom: 20px;
}

.business-analysis .el-col {
    margin-bottom: 20px;
}

.business-analysis .el-card {
    border-radius: 12px;
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    border: none;
    overflow: hidden;
}

.business-analysis .el-card:hover {
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.15);
    transform: translateY(-4px) scale(1.02);
}

.business-analysis .el-card__header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    padding: 18px 24px;
    font-weight: 600;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.business-analysis .el-card__header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.business-analysis .el-card:hover .el-card__header::before {
    left: 100%;
}

.business-analysis .el-card__body {
    padding: 24px;
    height: calc(100% - 70px);
    background: white;
    display: flex;
    flex-direction: column;
}

/* 图表容器样式 - 修复显示问题 */
.business-analysis .chart-container {
    height: 450px !important;
    width: 100% !important;
    min-height: 450px !important;
    position: relative;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 漏斗图特殊样式 */
.business-analysis .funnel-chart {
    height: 450px !important;
    min-height: 450px !important;
}

/* 利用率排行特殊样式 */
.business-analysis .utilization-chart {
    height: 450px !important;
    min-height: 450px !important;
}

/* 营收趋势特殊样式 */
.business-analysis .revenue-chart {
    height: 450px !important;
    min-height: 450px !important;
}

/* 服务分布特殊样式 */
.business-analysis .distribution-chart {
    height: 450px !important;
    min-height: 450px !important;
}

/* 强制显示图表 */
.business-analysis .chart-container canvas {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .business-analysis .chart-container {
        height: 400px !important;
        min-height: 400px !important;
    }

    .business-analysis .funnel-chart {
        height: 400px !important;
        min-height: 400px !important;
    }

    .business-analysis .utilization-chart {
        height: 400px !important;
        min-height: 400px !important;
    }

    .business-analysis .revenue-chart {
        height: 400px !important;
        min-height: 400px !important;
    }

    .business-analysis .distribution-chart {
        height: 400px !important;
        min-height: 400px !important;
    }
}

@media (max-width: 768px) {
    .business-analysis .chart-container {
        height: 350px !important;
        min-height: 350px !important;
    }

    .business-analysis .funnel-chart {
        height: 350px !important;
        min-height: 350px !important;
    }

    .business-analysis .utilization-chart {
        height: 350px !important;
        min-height: 350px !important;
    }

    .business-analysis .revenue-chart {
        height: 350px !important;
        min-height: 350px !important;
    }

    .business-analysis .distribution-chart {
        height: 350px !important;
        min-height: 350px !important;
    }

    .business-analysis .el-card__header {
        padding: 12px 16px;
        font-size: 14px;
    }

    .business-analysis .el-card__body {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .business-analysis .chart-container {
        height: 300px !important;
        min-height: 300px !important;
    }

    .business-analysis .funnel-chart {
        height: 300px !important;
        min-height: 300px !important;
    }

    .business-analysis .utilization-chart {
        height: 300px !important;
        min-height: 300px !important;
    }

    .business-analysis .revenue-chart {
        height: 300px !important;
        min-height: 300px !important;
    }

    .business-analysis .distribution-chart {
        height: 300px !important;
        min-height: 300px !important;
    }

    .business-analysis .el-card__header {
        padding: 10px 14px;
        font-size: 13px;
    }

    .business-analysis .el-card__body {
        padding: 14px;
    }
}

/* 卡片头部样式 */
.business-analysis .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.business-analysis .card-header span {
    font-weight: 600;
    font-size: 15px;
}

.business-analysis .el-button {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.business-analysis .el-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 确保图表容器在所有情况下都可见 */
.business-analysis .el-card__body>div {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.business-analysis .chart-container {
    flex: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* 调试样式 - 确保容器可见 */
.business-analysis .chart-container::before {
    content: '图表容器';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 12px;
    z-index: -1;
    display: none;
}

.business-analysis .chart-container:empty::before {
    display: block;
}

/* 动画效果 */
.business-analysis .el-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 加载状态 */
.business-analysis .loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #909399;
}

/* 错误状态 */
.business-analysis .error {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #f56c6c;
    flex-direction: column;
}

.business-analysis .error .el-icon {
    font-size: 48px;
    margin-bottom: 10px;
}